		local frame = CreateFrame("FRAME");
		frame:RegisterEvent("PLAYER_TARGET_CHANGED")
		function frame:OnEvent(event, arg1)
		
			if event == "PLAYER_TARGET_CHANGED" then	
					local _, class = UnitClass("target")
					local Test = CreateFrame("Frame","Test",InspectFrame)
						Test:SetWidth(64)
						Test:SetHeight(64)
						Test:SetPoint("Topleft", -8,9)
						Test:CreateTexture("TestTexture")
						TestTexture:SetAllPoints()
						TestTexture:SetTexture("Interface\\Addons\\miirgui\\gfx\\class_icons\\classes")
													if class =="WARRIOR" then
													TestTexture:SetTexCoord(0, 0.25, 0, 0.25)	
													elseif class== "MAGE" then
													TestTexture:SetTexCoord(0.25, 0.5, 0, 0.25)
													elseif class== "ROGUE" then
													TestTexture:SetTexCoord(0.5, 0.75, 0, 0.25)
													elseif class== "DRUID" then 
													TestTexture:SetTexCoord(0.75, 1, 0, 0.25)
													elseif class== "HUNTER" then 
													TestTexture:SetTexCoord(0, 0.25, 0.25, 0.5)
													elseif class== "SHAMAN" then
													TestTexture:SetTexCoord(0.25, 0.5, 0.25, 0.5)
													elseif class== "PRIEST" then 
													TestTexture:SetTexCoord(0.5, 0.75, 0.25, 0.5)
													elseif class== "WARLOCK" then 
													TestTexture:SetTexCoord(0.75, 1, 0.25, 0.5)
													elseif class == "PALADIN" then
													TestTexture:SetTexCoord(0, 0.25, 0.5, 0.75)
													elseif class== "DEATHKNIGHT" then
													TestTexture:SetTexCoord(0.25, .5, 0.5, .75)
													end
							
			end
		
	
		end
		frame:SetScript("OnEvent", frame.OnEvent);
